<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
*/

$app->get('/', function(){
	echo "welcome to ptime3user api.";
	// echo date("Y-m-d H:i:s");
	
});

$app->get 	('/user/exsit',				'UserController@exist');

$app->get  	('/user', 					'UserController@index');
$app->post  ('/user', 					'UserController@store');
$app->get  	('/user/{id}', 				'UserController@show');
$app->put 	('/user/{id}', 				'UserController@update');
$app->delete('/user/{id}', 				'UserController@destroy');

$app->get 	('/user/token/{token}', 	'UserController@showWithToken');
$app->get 	('/user/phone/{phone}', 	'UserController@showWithPhone');
$app->get 	('/user/unionid/{unionid}', 'UserController@showWithUnionid');

$app->post 	('/user/login', 			'UserController@login');
$app->post 	('/user/{id}/logout', 		'UserController@logout');

$app->post  ('/user/verifycode', 		'UserController@verifycode');
$app->post  ('/user/verifycode/verify',	'UserController@verifycodeVerify');
$app->post  ('/user/verifyemail', 		'UserController@verifyemail');
$app->post  ('/user/findpassword', 		'UserController@findpassword');

$app->post  ('/upgradeinform', 		'UserController@upgradeinform');